package com.yuefresh.dish;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

import com.yuefresh.core.Model;


@Entity
@Table(name = "ds_area")
public class Area  extends Model {
	private static final long serialVersionUID = 1534214124234L;
	
	@Id
	@GeneratedValue(strategy = GenerationType.AUTO)
	@Column(name = "ID")
	private Long id;
	@Column(name = "CODE")
	private String code;
	@Column(name = "NAME")
	private String name;
	@Column(name = "DESCRIPTION")
	private String description;
	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "TYPE_FK")
	private AreaType type;
	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "PARENT_FK")
	private Area parent;
	private Integer capacity;
	@Column(name = "DISPLAY_CHILD")
	private Boolean displayChild;
	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "RESTAURANT_FK")
	private Restaurant restaurant;
	@Column(name = "IMG_PATH")
	private String imgPath;
	
	public Area() {}
	
	public Long getId() {
		return id;
	}
	public void setId(Long id) {
		this.id = id;
	}

	public String getCode() {
		return code;
	}
	public void setCode(String code) {
		this.code = code;
	}

	public String getName() {
		return name;
	}
	public void setName(String name) {
		this.name = name;
	}

	public String getDescription() {
		return description;
	}
	public void setDescription(String description) {
		this.description = description;
	}

	public AreaType getType() {
		return type;
	}
	public void setType(AreaType type) {
		this.type = type;
	}

	public Area getParent() {
		return parent;
	}
	public void setParent(Area parent) {
		this.parent = parent;
	}

	public Integer getCapacity() {
		return capacity;
	}
	public void setCapacity(Integer capacity) {
		this.capacity = capacity;
	}

	public Boolean getDisplayChild() {
		return displayChild;
	}
	public void setDisplayChild(Boolean displayChild) {
		this.displayChild = displayChild;
	}

	public Restaurant getRestaurant() {
		return restaurant;
	}
	public void setRestaurant(Restaurant restaurant) {
		this.restaurant = restaurant;
	}

	public String getImgPath() {
		return imgPath;
	}
	public void setImgPath(String imgPath) {
		this.imgPath = imgPath;
	}
}
